//
//  DetailShowImageViewCell.m
//  ABSallRec
//
//  Created by 我演示 on 2019/11/10.
//  Copyright © 2019 Jerry-Fu. All rights reserved.
//

#import "DetailShowImageViewCell.h"

@interface DetailShowImageViewCell ()
/**图片展示*/
@property(nonatomic,weak) UIImageView *showImageView ;

@end

@implementation DetailShowImageViewCell


+(instancetype)cellWithTableView:(UITableView *)tableView {
    
    static NSString *string = @"sting";
    
    DetailShowImageViewCell *cell =[tableView dequeueReusableCellWithIdentifier:string];
    if (cell == nil) {
        cell = [[DetailShowImageViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:string];
    }
    return  cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self makeUpUI];
        [self makeUpSubviews];
    }
    return  self;
}

-(void)setModel:(DetailImageShowModel *)model {
    _model = model ;
    [self.showImageView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"tabBar_publish_icon"]];
}

-(void)makeUpUI {
    
    UIImageView *showImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tabBar_publish_icon"]];
    [self.contentView addSubview:showImageView];
    self.showImageView = showImageView ;
    
}
-(void)makeUpSubviews {
    [self.showImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.equalTo(self).offset(0);
    }];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
